<artificialIntelligenceNetworks>

	<summary>
		This is a summary of the parts of the artificialIntelligenceNetworks folder
		that I intend to become a part of Audivolv.
		Most things there are how the plan changed over time.
	</summary>

	<updatedWhatIsANetwork>
		A "virtual array" is not an Integer. It is an acyclic network of Iter objects, which have a size and branch to arrays.
		Each Iter has 1 current iteration index, and the same array can have multiple Iter in the same acyclic network of Iters.
		A node can be in many networks because network-specific info is not stored in nodes.
		Instead, network-specific info is stored in heapQueues etc in the network.
		Node and network are the same type of thing.
		Every node is a constant size Object array containing arrays of various sizes and types,
		whose type are fixed in the node definition, and whose sizes depend on eachother in terms of * and ^ functions.
		* is multiply and ^ is power.
	</updatedWhatIsANetwork>

	<whatIsANetwork>
		A network is a set of with directed edges to other nodes in the same network.

		Every node is a member of exactly 1 network.

		Each node has 1 float, and the nodes are sorted in the network by those floats.
		All nodes are a small array of node arrays and/or float arrays.

		The size requirements of all arrays in a node depend on multiple arrays
		in the same node and network (but never the other nodes of the network).

		Because nodeFunc must be symmetric for all a node's child nodes,
		only symmetric operators are allowed when defining array size requirements,
		which include CONSTANT, EQUALS, MULTIPLY, and POWER. The operators
		MULTIPLY and POWER each take 4 array parameters: minSize, maxSize, lvalue, rvalue.

		For example, if bayesTruthValues=[false,true] and bayesChilds=[child0,child1...child6],
		then define bayesChances as POWER(someMinArray, someMaxArray, bayesTruthValues, bayesChilds).
		The bayesChances and bayesChilds arrays
		must change size at the same time (between network iterations).

		There may be optimizations that delay sorting the network until necessary,
		but we can ignore those for now and view the network as always being sorted.

		A network has exactly 1 nodeFunc, and it modifies at most
		its parameter node and its child nodes.
		A nodeFunc can contain any deterministic algorithm(s), including floatFunc.
		All modified nodes must be sorted in the network before being used again (optimize here).

		Each itertion of the network, at most the first node and its child nodes are affected,
		and those must be sorted in the network before being used again (optimize here).

		The following things can only be done from outside a network
		and not during an iteration of that network:
		* add or remove node to/from network
		* add or remove child node of a node
		* change order of nodes in a node

		This system is flexible enough to create neural networks, bayesian networks,
		and evolved variations of those. It is theoretically possible for this system to
		evolve a bayesian algorithm and network without starting with anything bayesian,
		and to use that create algorithms superior to bayesian.

		To start Audivolv, I must give it a few good network algorithms (as data, not hard-coded)
		which it can use until it evolves better algorithms. It can choose to stop using them.

	</whatIsANetwork>

	<sortingNodesInTheNetwork>
		Instead of a Java interface or class, a network could be an Object array which contains these things:
		* array of nodes, mapped to index 0 in the array namespace.
		* small array of nodes which are possibly higher than the threshold sort value.
		* size-1 array of 1 float, the threshold sort value.
		* string of code describing array size requirements and other network properties.
		After execute a node, iterate over all its child nodes, and for each child node which is above
		the current sort threshold float, add it to the small node array overwriting
		a node in that array with a sort value less than the threshold.
		If no node in the small array has a sort value less than the threshold,
		increase the threshold a little then overwrite it.
		It may be fast enough to use a Comparator to sort the small array,
		find how many are less than the sort threshold float, and allow overwriting the lower range of the array without checking each node individually.
		Often, all nodes in the small array will be below the threshold, and the large array will have to be
		searched for at least 1 node at least that threshold, or it could be sorted then take the top few into the smaller array.
	</sortingNodesInTheNetwork>

	<whatWillNetworksBeUsedFor>
		I can think of 2 main things networks will be used for: prediction and intention.

		X audio samples of a few seconds each, and Y audio measures.
		X*Y total datasets.
		2 networks, 1 with X inputs and Y outputs, and the other with Y inputs and X outputs.

		Learn which audio samples are similar, which are redundant,
		and which are probable when others are probable or improbable, etc.

		Learn which audio measures are similar, which are redundant,
		and which are probable when others are probable or improbable, etc.

		Keep samples and measures that are more unique and high-scoring.

		Similarly, a network with X inputs and Y outputs could
		use X as senses and Y as its goals. Instead of predicting which	combination of X
		will lead to which combination of Y, it could try to cause it to lead to that.

		These predictions can be applied to audioMeasure floatFuncs or
		(I havent defined these yet) mutator functions to evolve/breed/build floatFuncs
		and other types of algorithms.

		Evolved floatFuncs can become nodeFuncs to evolve new types of networks,
		and be executed once per node iteration.
		For example, a bayesian node with 32 floats may have 3*32 iterations to execute that node.
	</whatWillNetworksBeUsedFor>

	<partsOfAudivolvAreTheseJavaTypes>
		<float>
			double
		</float>
		<floatList_or_float_array>
			double[]
		</floatList>
		<node>
			java.lang.Object[]
		</node>
		<nodeList_or_nodeArray>
			java.lang.Object[]
		</nodeList>
		<network>
			I dont know which of these 2: java.lang.Object[] or Network (a new Java interface).
		</network>
		<code>
			java.lang.String
		</code>
		<index>
			int
		</index>
		<virtualArray>
			java.lang.Integer
		</virtualArray>
		<AudivolvAgent>
			I dont know which Java type this will be.
		</AudivolvAgent>
		<AudivolvStream>
			audivolv.AudivolvStream is an arbitrary class (or interface?) I will create.
		</AudivolvStream>
		<floatFunc>
			I dont know which Java type this will be.
				Its similar to codesimian.CS, but that code should not be used.
				There may be 2 types: a Java object
					and some simpler representation of code to interpret at runtime.
		</floatFunc>
		<nodeFunc>
			I dont know which Java type this will be.
		</nodeFunc>
	<partsOfAudivolvAreTheseJavaTypes>

</artificialIntelligenceNetworks>